package com.cmii.sjw.department.control.jsc.service.impl;

import cn.hutool.http.Header;
import cn.hutool.http.HttpUtil;
import com.cmii.sjw.department.control.jsc.service.DxsjyzcfwService;
import com.cmii.sjw.department.control.jsc.util.Result;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

/**
 * @author jfh
 * @Date 2025年10月13日 16:03
 */
@Slf4j
@Service
public class DxsjyzcfwServiceImpl implements DxsjyzcfwService {

    @Override
    public Result<String> cqData() {
        String url = "https://www.cqbys.com/cqData";
        String apiResult = HttpUtil.createGet(url)
                        .execute()
                        .body();
        log.info("cqData ,url:{},apiResult:{}", url, apiResult);
        com.alibaba.fastjson2.JSONObject content = com.alibaba.fastjson2.JSON.parseObject(apiResult);
        return Result.success(content.toString());
    }
}
